<script>
const plugin = uni.requireNativePlugin('RFIDPlugin')
export default {
  onLaunch: function () {
    plugin.getImei(res => {
      console.log(res)
      // uni.setStorageSync('uuid', plus.device.uuid.split(",")[0])
      uni.setStorageSync('uuid', res)
    })
    const token = uni.getStorageSync("token");
    if (!token) {
      uni.reLaunch({
        url: "/pages/login/login",
      });
    }
  },
  onShow: function () {
    console.log("App Show");
    // const args = JSON.parse(plus.runtime.arguments)
    // if (args.path) {
    //   uni.navigateTo({
    //     url: args.path + "?item=" + args.item + "&show=1" + "&scanItem=" + args.scanItem + "&deviceItem=" + args.deviceItem
    //   })
    // }
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style>
/* ==================
	        初始化
	 ==================== */
page {
  background-color: #f5f5f5;
  font-size: 30rpx;
  color: #272e2d;
  font-family: Helvetica Neue, Helvetica, sans-serif;
}

view,
scroll-view,
swiper,
button,
input,
textarea,
label,
navigator,
image {
  box-sizing: border-box;
}

.sun-page {
  padding: 30rpx;
}

#app {
  height: auto !important;
}

.u-tabs__wrapper__nav__item__text {
  font-size: 30rpx !important;
}
</style>

<style lang="scss">
@import "@/uni_modules/uview-plus/index.scss";
</style>
